home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / trimProperties.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.9 KB  |  105 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date: Aug 6, 1996
  22. //  Author:        steodosiadis
  23. //
  24. //  Description:
  25. //      These procs create the controls for a trim tool property sheet.
  26. //      See also trimValues.mel for procs that set the state of the
  27. //      property sheet.
  28. //
  29. //  Input Arguments:
  30. //      None.
  31. //
  32. //  Return Value:
  33. //      None.
  34. //
  35.  
  36.  
  37. global proc trimHistoryLink( string $parent, string $node )
  38. {
  39.     setParent $parent;
  40.  
  41.     // selectedState:
  42.     connectControl trimSelectedState ($node + ".sl");
  43.  
  44.     // trimOptions:
  45.     connectControl -index 2 trimOptions ($node + ".sh");
  46.  
  47.     // slider for fitting tolerance:
  48.     //
  49.     connectControl fitTolerance($node + ".tol") ;
  50. }
  51.  
  52. global proc trimProperties()
  53. //
  54. //  Description:
  55. //      This procedure builds the property sheet and assigns callbacks to
  56. //      its controls.  The state of the controls are set in trimValues().
  57. //
  58. //
  59. {
  60.     int $hasNodes = 0;
  61.  
  62.     string $parent = `toolPropertyWindow -q -location`;
  63.     string $curctx = `currentCtx`;
  64.     string $node = `trimCtx -q -tnq $curctx`;
  65.     string $ext_defaultToolID = "trimDefaultProperties";
  66.  
  67.     setUITemplate -pushTemplate OptionsTemplate;
  68.  
  69.     setParent $parent;
  70.     columnLayout -adj true trim;
  71.         separator -st "none";
  72.         $parent = `setParent -query`;
  73.  
  74.          frameLayout -l "Trim Settings" -collapse false trimHistory_Frame;    
  75.             columnLayout trimHistory_Column;
  76.                 radioButtonGrp -nrb 2 -sl 1 
  77.                     -l "Selected State"
  78.                     -l1 "Keep" -da1 0
  79.                     -l2 "Discard" -da2 1
  80.                     trimSelectedState;
  81.  
  82.                 checkBoxGrp -ncb 1 
  83.                     -l " "  
  84.                     -l1 "Shrink surface"
  85.                     trimOptions;
  86.  
  87.                 floatSliderGrp -field true -l "Fitting Tolerance" fitTolerance;
  88.             setParent ..;
  89.         setParent ..;
  90.  
  91.         trimHistoryLink( $parent, $node );
  92.         commonModellingProperties( $parent, "trimCtx" );
  93.         optionalCommonModellingSetCallbacks($parent, 
  94.                 "trimCtx", 
  95.                 "dontShowOutputStyle", 
  96.                 "showKeepOriginals",
  97.                 "dontShowCurveRange",
  98.                 "dontShowRebuild");
  99.  
  100.     setParent ..; // columnLayout
  101.  
  102.     setUITemplate -popTemplate;
  103. }
  104.  
  105.